package com.abso.mp3tunes.locker.ui;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;

/**
 * Bundle of all images contributed by the Locker UI plug-in.
 */
public final class LockerImages {

	/** Identifies the image used to add a playlist. */
	public static final String ADD_TO_PLAYLIST = "ADD_TO_PLAYLIST";

	/** Identifies the album image. */
	public static final String ALBUM = "ALBUM";

	/** Identifies the artist image. */
	public static final String ARTIST = "ARTIST";

	/** Identifies the ASX format image. */
	public static final String ASX = "ASX";

	/** Identifies the Locker browser image. */
	public static final String BROWSER = "BROWSER";

	/** Identifies the image used to collapse tree nodes. */
	public static final String COLLAPSE_ALL = "COLLAPSE_ALL";

	/** Identifies the Last.fm image. */
	public static final String LAST_FM = "LAST_FM";
	
	/** Identifies the M3U format image. */
	public static final String M3U = "M3U";

	/** Identifies the image used to skip to the next track. */
	public static final String NEXT_TRACK = "NEXT_TRACK";

	/** Identifies the image used to pause the music player. */
	public static final String PAUSE_TRACK = "PAUSE_TRACK";

	/** Identifies the image used to signal that a node is refreshing. */
	public static final String PENDING = "PENDING";

	/**
	 * Identifies the image used to enque the current selection into the music
	 * player.
	 */
	public static final String PLAY = "PLAY";

	/** Identifies the image used to play the current track. */
	public static final String PLAY_TRACK = "PLAY_TRACK";

	/** Identifies the MP3 player image. */
	public static final String PLAYER = "PLAYER";

	/** Identifies the playlist image. */
	public static final String PLAYLIST = "PLAYLIST";

	/** Identifies the image used to skip to the previous track. */
	public static final String PREVIOUS_TRACK = "PREVIOUS_TRACK";

	/** Identifies the image used to refresh the tree. */
	public static final String REFRESH = "REFRESH";

	/**
	 * Identifies the image used to remove the selected tracks from their
	 * playlists.
	 */
	public static final String REMOVE_FROM_PLAYLIST = "REMOVE_FROM_PLAYLIST";

	/** Identifies the image used to repeat the player queue. */
	public static final String REPEAT = "REPEAT";

	/** Identifies the image used to search the Locker. */
	public static final String SEARCH = "SEARCH";

	/** Identifies the image used to shuffle the player queue. */
	public static final String SHUFFLE = "SHUFFLE";

	/** Identifies the image used to stop the playing. */
	public static final String STOP_TRACK = "STOP_TRACK";

	/** Identifies the track image. */
	public static final String TRACK = "TRACK";

	/** Identifies the XSPF format image. */
	public static final String XSPF = "XSPF";
	
	/**
	 * Gets the image with the specified key.
	 * 
	 * @param key
	 *            an image key.
	 * @return the image with the specified key.
	 */
	public static final Image get(String key) {
		if (key == null) {
			return null;
		}
		return LockerPlugin.getDefault().getImageRegistry().get(key.toString());
	}

	/**
	 * Gets the image descriptor with the specified key.
	 * 
	 * @param key
	 *            an image key.
	 * @return the image descriptor with the specified key.
	 */
	public static final ImageDescriptor getDescriptor(String key) {
		if (key == null) {
			return null;
		}
		return LockerPlugin.getDefault().getImageRegistry().getDescriptor(
				key.toString());
	}

}